Optimal. Leaf size=152 \[ -\frac {a d e \left (a+b x^2\right )^{1+p}}{b^2 (1+p)}+\frac {e^2 x^3 \left (a+b x^2\right )^{1+p}}{b (5+2 p)}+\frac {d e \left (a+b x^2\right )^{2+p}}{b^2 (2+p)}-\frac {\left (3 a e^2-b d^2 (5+2 p)\right ) x^3 \left (a+b x^2\right )^p \left (1+\frac {b x^2}{a}\right )^{-p} \, _2F_1\left (\frac {3}{2},-p;\frac {5}{2};-\frac {b x^2}{a}\right )}{3 b (5+2 p)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 144, normalized size of antiderivative = 0.95, number of steps
used = 8, number of rules used = 7, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.350, Rules used = {1666, 470, 372,
371, 12, 272, 45} \begin {gather*} -\frac {a d e \left (a+b x^2\right )^{p+1}}{b^2 (p+1)}+\frac {d e \left (a+b x^2\right )^{p+2}}{b^2 (p+2)}+\frac {1}{3} x^3 \left (a+b x^2\right )^p \left (\frac {b x^2}{a}+1\right )^{-p} \left (d^2-\frac {3 a e^2}{2 b p+5 b}\right ) \, _2F_1\left (\frac {3}{2},-p;\frac {5}{2};-\frac {b x^2}{a}\right )+\frac {e^2 x^3 \left (a+b x^2\right )^{p+1}}{b (2 p+5)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 45
Rule 272
Rule 371
Rule 372
Rule 470
Rule 1666
Rubi steps
\begin {align*} \int x^2 (d+e x)^2 \left (a+b x^2\right )^p \, dx &=\int 2 d e x^3 \left (a+b x^2\right )^p \, dx+\int x^2 \left (a+b x^2\right )^p \left (d^2+e^2 x^2\right ) \, dx\\ &=\frac {e^2 x^3 \left (a+b x^2\right )^{1+p}}{b (5+2 p)}+(2 d e) \int x^3 \left (a+b x^2\right )^p \, dx-\left (-d^2+\frac {3 a e^2}{5 b+2 b p}\right ) \int x^2 \left (a+b x^2\right )^p \, dx\\ &=\frac {e^2 x^3 \left (a+b x^2\right )^{1+p}}{b (5+2 p)}+(d e) \text {Subst}\left (\int x (a+b x)^p \, dx,x,x^2\right )-\left (\left (-d^2+\frac {3 a e^2}{5 b+2 b p}\right ) \left (a+b x^2\right )^p \left (1+\frac {b x^2}{a}\right )^{-p}\right ) \int x^2 \left (1+\frac {b x^2}{a}\right )^p \, dx\\ &=\frac {e^2 x^3 \left (a+b x^2\right )^{1+p}}{b (5+2 p)}+\frac {1}{3} \left (d^2-\frac {3 a e^2}{5 b+2 b p}\right ) x^3 \left (a+b x^2\right )^p \left (1+\frac {b x^2}{a}\right )^{-p} \, _2F_1\left (\frac {3}{2},-p;\frac {5}{2};-\frac {b x^2}{a}\right )+(d e) \text {Subst}\left (\int \left (-\frac {a (a+b x)^p}{b}+\frac {(a+b x)^{1+p}}{b}\right ) \, dx,x,x^2\right )\\ &=-\frac {a d e \left (a+b x^2\right )^{1+p}}{b^2 (1+p)}+\frac {e^2 x^3 \left (a+b x^2\right )^{1+p}}{b (5+2 p)}+\frac {d e \left (a+b x^2\right )^{2+p}}{b^2 (2+p)}+\frac {1}{3} \left (d^2-\frac {3 a e^2}{5 b+2 b p}\right ) x^3 \left (a+b x^2\right )^p \left (1+\frac {b x^2}{a}\right )^{-p} \, _2F_1\left (\frac {3}{2},-p;\frac {5}{2};-\frac {b x^2}{a}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.23, size = 139, normalized size = 0.91 \begin {gather*} \frac {1}{15} \left (a+b x^2\right )^p \left (5 d^2 x^3 \left (1+\frac {b x^2}{a}\right )^{-p} \, _2F_1\left (\frac {3}{2},-p;\frac {5}{2};-\frac {b x^2}{a}\right )+\frac {3 e \left (-\frac {5 d \left (a+b x^2\right ) \left (a-b (1+p) x^2\right )}{b^2}+e \left (2+3 p+p^2\right ) x^5 \left (1+\frac {b x^2}{a}\right )^{-p} \, _2F_1\left (\frac {5}{2},-p;\frac {7}{2};-\frac {b x^2}{a}\right )\right )}{(1+p) (2+p)}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.02, size = 0, normalized size = 0.00 \[\int x^{2} \left (e x +d \right )^{2} \left (b \,x^{2}+a \right )^{p}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 338 vs.
\(2 (126) = 252\).
time = 9.65, size = 400, normalized size = 2.63 \begin {gather*} \frac {a^{p} d^{2} x^{3} {{}_{2}F_{1}\left (\begin {matrix} \frac {3}{2}, - p \\ \frac {5}{2} \end {matrix}\middle | {\frac {b x^{2} e^{i \pi }}{a}} \right )}}{3} + \frac {a^{p} e^{2} x^{5} {{}_{2}F_{1}\left (\begin {matrix} \frac {5}{2}, - p \\ \frac {7}{2} \end {matrix}\middle | {\frac {b x^{2} e^{i \pi }}{a}} \right )}}{5} + 2 d e \left (\begin {cases} \frac {a^{p} x^{4}}{4} & \text {for}\: b = 0 \\\frac {a \log {\left (x - \sqrt {- \frac {a}{b}} \right )}}{2 a b^{2} + 2 b^{3} x^{2}} + \frac {a \log {\left (x + \sqrt {- \frac {a}{b}} \right )}}{2 a b^{2} + 2 b^{3} x^{2}} + \frac {a}{2 a b^{2} + 2 b^{3} x^{2}} + \frac {b x^{2} \log {\left (x - \sqrt {- \frac {a}{b}} \right )}}{2 a b^{2} + 2 b^{3} x^{2}} + \frac {b x^{2} \log {\left (x + \sqrt {- \frac {a}{b}} \right )}}{2 a b^{2} + 2 b^{3} x^{2}} & \text {for}\: p = -2 \\- \frac {a \log {\left (x - \sqrt {- \frac {a}{b}} \right )}}{2 b^{2}} - \frac {a \log {\left (x + \sqrt {- \frac {a}{b}} \right )}}{2 b^{2}} + \frac {x^{2}}{2 b} & \text {for}\: p = -1 \\- \frac {a^{2} \left (a + b x^{2}\right )^{p}}{2 b^{2} p^{2} + 6 b^{2} p + 4 b^{2}} + \frac {a b p x^{2} \left (a + b x^{2}\right )^{p}}{2 b^{2} p^{2} + 6 b^{2} p + 4 b^{2}} + \frac {b^{2} p x^{4} \left (a + b x^{2}\right )^{p}}{2 b^{2} p^{2} + 6 b^{2} p + 4 b^{2}} + \frac {b^{2} x^{4} \left (a + b x^{2}\right )^{p}}{2 b^{2} p^{2} + 6 b^{2} p + 4 b^{2}} & \text {otherwise} \end {cases}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int x^2\,{\left (b\,x^2+a\right )}^p\,{\left (d+e\,x\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________